package com.aoip.telemetry.telemetry.entity.pipeline;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 测站关联处理器实体
 *
 * @author chenbai
 * @version 1.0
 * @date 2022/2/14 11:02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Builder
@TableName("rel_st_handle")
@ApiModel(description = "测站关联处理器实体")
public class RelStHandleEntity {
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty("测站关联处理器主键")
    private String id;

    @TableField(value = "handle_id")
    @ApiModelProperty("处理器id")
    private String handleId;

    @TableField(value = "strategy_type")
    @ApiModelProperty("策略类型(“全站1、区域2、行业3、季节4、单站5”)")
    private String strategyType;

    @TableField(value = "strategy_type_cn", exist = false)
    @ApiModelProperty("策略类型(“全站0、区域1、行业2、季节3、单站4”)")
    private String strategyTypeCn;

    @TableField(value = "strategy_order")
    @ApiModelProperty("针对多个策略关联同一个站点时，各个策略的顺序，默认按照策略类型数字编号升序顺序")
    private Integer strategyOrder;

    @TableField(value = "enable_status")
    @ApiModelProperty("是否启用（0不启用；1启用）")
    private Integer enableStatus;

    @TableField(value = "ad_code")
    @ApiModelProperty("行政区编码（区域）")
    private String adCode;

    @TableField(value = "industry_type")
    @ApiModelProperty("行业类别（行业）,具体见字典表")
    private String industryType;

    @TableField(value = "st_type")
    @ApiModelProperty("测站类型（全局）")
    private String stType;

    @TableField(value = "begin_day")
    @ApiModelProperty("开始时间（季节）")
    private LocalDate beginDay;

    @TableField(value = "end_day")
    @ApiModelProperty("结束时间（季节）")
    private LocalDate endDay;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @TableField(value = "modify_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("修改时间")
    private LocalDateTime modifyTime;

    @TableField(value = "del_flag", fill = FieldFill.INSERT)
    @ApiModelProperty("是否删除（0：正常，1：删除）")
    @TableLogic
    private Integer delFlag;

    @TableField(value = "bz")
    @ApiModelProperty("备注信息")
    private String bz;

    @TableField(value = "pipelineHandleEntity", exist = false)
    private PipelineHandleEntity pipelineHandleEntity;

    @TableField(value = "st_code",exist = false)
    @ApiModelProperty("测站编码")
    private String stCode;

    @TableField(exist = false)
    @ApiModelProperty("测站编码")
    private List<RelStHandleStEntity> relStHandleStEntityList;
}
